package org.dwell.vertx3.protocol;

/**
 * Created by JianGuo on 2016/1/13.
 */
public class VertMessage {
    public static final String ACTION = "message";
    private String sender;
    private String content;
    private String room;
    private Header header;
    private String command;

    public VertMessage() {
        this("");
    }

    public VertMessage(String content) {
        this.content = content;
    }

    public VertMessage(String content, String room) {
        this.content = content;
        this.room = room;
        this.header = new Header(ACTION);
    }

    public VertMessage resetMessage() {
        this.header = new Header(ACTION);
        return this;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getRoom() {
        return room;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public Header getHeader() {
        return header;
    }

    public void setHeader(Header header) {
        this.header = header;
    }

    public String getCommand() {
        return command;
    }

    public void setCommand(String command) {
        this.command = command;
    }
}
